function [sl]=slXtrial(data,band)


[nCh,nSample]=size(data.trial{1});
nTrials=length(data.trial)
syncM=zeros(nTrials,nCh,nCh);

for i=1:nTrials
      syncM(i,:,:)=SLopt(data.trial{i},data.fsample,band(1),band(end));
end
sl=squeeze(mean(syncM,1));
